<div class="root">
    <!--header-->
    <div class="header">
        <!--背景-->
        <image resize="cover" class="shop-bg" :src="shopBg"></image>

        <div class="header-shop">
            <div class="shop-main">
                <div class="shop-search" @click="goToSearch">
                    <image resize="cover" class="search-icon" :src="searchIcon"></image>
                    <text class="s-s-txt font-msyhl">搜索店内商品</text>
                </div>

                <div class="s-m-right">
                    <image resize="cover" class="wallet-icon" :src="walletIcon" @click="goToCoupon"></image>
                    <image resize="cover" class="order-icon" :src="orderIcon" @click="goToOrder"></image>
                </div>
            </div>

            <div class="shop-info">
                <div class="s-i-left">
                    <image resize="cover" class="shop-logo" :src="shopInfo.s_logo || defaultImg"></image>

                    <div class="s-i-main">
                        <div class="s-i-m-item">
                            <text class="item-txt font-msyhl">{{shopInfo.sname}}</text>
                            <text class="item-txt font-msyhl">{{shopInfo.s_tel}}</text>
                        </div>

                        <div class="s-i-m-item">
                            <text class="item-txt font-msyhl">宝贝数量 {{shopInfo.s_goodsnum}}</text>
                            <text class="item-txt font-msyhl">总销量 {{shopInfo.s_sellnum}}</text>
                        </div>
                    </div>
                </div>

                <div class="s-i-right" v-if="shopInfo.sales">
                    <div class="s-sales" v-for="(act, k) in shopInfo.sales">
                        <image resize="cover" class="s-s-icon" :src="act.img"></image>
                        <text class="s-sales-txt font-msyhl">{{act.left}}</text>
                        <text class="s-sales-txt font-msyhl" v-if="act.right">{{act.right}}</text>
                    </div>
                </div>
            </div>

            <scroller show-scrollbar="false" scroll-direction="horizontal" class="shop-catalog">
                <text :class="['catalog-txt',stringifyObj(c) == stringifyObj(catalogType) ? 'catalog-txt-active' : 'catalog-txt-common']" v-for="c in catalogList" @click="sortClick(c)">{{c[0]}}</text>
            </scroller>
        </div>
    </div>
    <!--/header-->

    <!--商品列表-->
    <div class="goods-wrapper">
        <goods-list :goodsList="goodsList" :listCompleted="listCompleted" :listLoaded="listLoaded" :loading="loading" @fetchMore="fetchMore">

        </goods-list>
    </div>

    <!--footer-->
    <footer-bar></footer-bar>
</div>
